home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: chang.unx.sas.com!walker
- From: walker@chang.unx.sas.com (Doug Walker)
- Subject: Re: Shared Lib problems
- Sender: news@unx.sas.com (Noter of Newsworthy Events)
- Message-ID: <DnJEs1.Lr0@unx.sas.com>
- Date: Thu, 29 Feb 1996 12:31:13 GMT
- X-Nntp-Posting-Host: chang.unx.sas.com
- References: <65641284%agos001@pn.itnet.it>
- Organization: SAS Institute Inc.
-
- In article <65641284%agos001@pn.itnet.it>,
- Stefano Agostinelli <agos001@pn.itnet.it> wrote:
- >Hi,
- >
- >I'm experiencing some problems during the development of a shared library.
- >
- >I'm sure I've made some errors,so please don't turn on flame throwers ;)
- >
- >The most striking problem I've is that some stdio functions do not work
- >at all when invoked in the library code: at least stcul_d and sprintf do
- >not(I'm quite sure),so have I to do something special in order to get
- >those working?
-
- stdio works IF your shared library was linked with libinitr.o. If you
- linked with libinit.o instead of libinitr.o, stdio will not work. I
- believe libinitr.o was added in the 6.50 version, so if you have an
- earlier version, you won't be able to use stdio from a shared library.
-
- >Then I tried to use amiga.lib sprintf. SAS/C manual says that I've to
- >slink with amiga.lib first of sc.lib,so I've done but the linker
- >just reports a multiple definition error (on Boopsi functions btw),so
- >what should I do in order to use amiga.lib stdio functions?
-
- Don't use the amiga.lib sprintf, use its Sprintf. There is a DOS function
- Sprintf that does not conflict with the ANSI namespace that the compiler
- uses. In my opinion, it was a horrible mistake for Commodore to put
- non-ANSI functions in their library that have ANSI names, but that's water
- under the bridge.
-
- I don't know what the deal is with your multiple definition error, I'd have
- to see more information. Your exact link command line (whether with SC or
- SLINK) would help, as would the error or warning message(s) that you are
- getting.
-
- --
- ***** / walker@unx.sas.com
- *|_o_o|\\ Doug Walker< BIX, Portal: djwalker
- *|. o.| || \ AOL: weissblau
- | o |//
- ======
- Any opinions expressed are mine, not those of SAS Institute, Inc.
-
-